<layout name="layout" />
<div class="main-div">
    <form method="post" action="{:U('edit')}"enctype="multipart/form-data" >
        <input type="hidden" name="id" value="{:I('get.id')}" />
        <table cellspacing="1" cellpadding="3" width="100%">
            <tr>
                <td class="label">上级分类</td>
                <td>
                	<select name="parent_id">
                		<option value="0">顶级分类</option>
                		
                		<foreach name="data" item="v">
                		
                			<php>if($v['id'] == $info['id'] || in_array($v['id'],$children)) continue;</php>
                		
                			<option value="{$v.id}" <if condition="$info['parent_id'] eq $v['id']">selected="selected"</if>>
                				<php>echo str_repeat('-',$v['level']*8);</php>{$v.cat_name}
                			</option>
                		</foreach> 
                	</select>
                    <span class="require-field">*</span>
                </td>
            </tr>
            <tr>
                <td class="label">分类名称</td>
                <td>
                    <input type="text" name="cat_name" size="60" maxlength="60" value="{$info.cat_name}" />
                    <span class="require-field">*</span>
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center"><br />
                    <input type="submit" class="button" value=" 确定 " />
                    <input type="reset" class="button" value=" 重置 " />
                </td>
            </tr>
        </table>
    </form>
</div>